button = new dynamicWidget("alert","ICONf12a","rotate(~~icon)",10,"alert('Hello!')","alert('Salut!')");

var degrees = 0;
function rotate(iconID){
    $("#"+iconID).css(
        "transform","rotate("+degrees+"deg)"
    );
    degrees++;
}

button.display();